package cn.ultrarisk.scadmin.manager.biz.common.entity;

import cn.ultrarisk.mybatis.extension.annotation.Table;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 操作日志实体类
 *
 * @author sevendlong(lin23871@163.com)
 * @date 2014/4/14
 * @since V1.0
 */
@Table(table = "operation_log", idColumn = OperationLog.ID, autoIncrement = true)
public class OperationLog implements Serializable {
    private static final long serialVersionUID = -4762242058415700446L;

    public final static String ID = "id";
    public final static String TYPE = "type";
    public final static String REMARK = "remark";
    public final static String OPT_TIME = "opt_time";
    public final static String IP = "ip";
    public final static String ADMIN_ID = "admin_id";

    public static final Map<String, String> COLUMN_PROPERTY_MAP = new LinkedHashMap<String, String>();

    static {
        COLUMN_PROPERTY_MAP.put(ID, "id");
        COLUMN_PROPERTY_MAP.put(TYPE, "type");
        COLUMN_PROPERTY_MAP.put(REMARK, "remark");
        COLUMN_PROPERTY_MAP.put(OPT_TIME, "optTime");
        COLUMN_PROPERTY_MAP.put(IP, "ip");
        COLUMN_PROPERTY_MAP.put(ADMIN_ID, "adminId");
    }

    public OperationLog() {
    }

    public OperationLog(Integer type, String remark, String ip, Integer adminId) {
        this.type = type;
        this.remark = remark;
        this.ip = ip;
        this.adminId = adminId;
    }

    /**
     * id
     */
    private Integer id;
    /**
     * 操作类型
     */
    private Integer type;
    /**
     * 操作描述
     */
    private String remark;
    /**
     * 操作时间
     */
    private Long optTime;
    /**
     * 操作IP
     */
    private String ip;
    /**
     * 操作者
     */
    private Integer adminId;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getOptTime() {
        return optTime;
    }

    public void setOptTime(Long optTime) {
        this.optTime = optTime;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

}